@marginList:1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,24,30,40,48,50,60,75;
//margin-left函数
.ml-loop(@list,@i:1,@val:extract(@list,@i)) when (length(@list)>=@i){
    .ml@{val}{
        margin-left:extract(@list,@i)/10rem;
    }
    .ml-loop(@list,(@i+1));
}
.ml-loop(@marginList);

//margin-right函数
.mr-loop(@list,@i:1,@val:extract(@list,@i)) when (length(@list)>=@i){
    .mr@{val}{
        margin-right:extract(@list,@i)/10rem;
    }
    .mr-loop(@list,(@i+1));
}
.mr-loop(@marginList);

//margin-bottom函数
.mb-loop(@list,@i:1,@val:extract(@list,@i)) when (length(@list)>=@i){
    .mb@{val}{
        margin-bottom:extract(@list,@i)/10rem;
    }
    .mb-loop(@list,(@i+1));
}
.mb-loop(@marginList);

//margin-top函数
.mt-loop(@list,@i:1,@val:extract(@list,@i)) when (length(@list)>=@i){
    .mt@{val}{
        margin-top:extract(@list,@i)/10rem;
    }
    .mt-loop(@list,(@i+1));
}
.mt-loop(@marginList);

.m10 {
    margin: 1rem;
}
.m24{
    margin: 2.4rem;
}